
#ifndef SCALEDIALOG_H
#define SCALEDIALOG_H

#include <BMesh>
#include <BGeometry>

#include <BButtonGroup>
#include <BLabel>
#include <BLineEdit>
#include <BDoubleSpinBox>
#include <BRadioBox>
#include <BTreeWidget>
#include <BListWidget>
#include <BDialog>

using namespace BWE;

class ModifyDialog : public BDialog
{
	BOBJECT(ModifyDialog);
public:
	ModifyDialog(BWidget* parent = 0);
	~ModifyDialog();

	void setSceneTree(BTreeWidget* sceneTree);
	BTreeWidget* sceneTree() const;

protected:
	void swapGroupYZ(BGroup* group);
	void swapNodeYZ(BNode* node);
	void swapShapeYZ(BShape* shape);
	void swapMeshYZ(BMesh* mesh);
	void swapGeometryYZ(BGeometry* geometry);
	void scaleShape(BShape* shape);

protected:
	void slotObjectsGroupChecked();
	void slotScaleRatioEdited();
	void slotScaleButtonClicked();
	void slotSwapYZClicked();

protected:
	virtual void showEvent(const BEvent& event);

	virtual void paintEvent(const BEvent& event);

private:
	BRadioBox*			_selectedObjectsRadioBox;
	BRadioBox*			_allObjectsRadioBox;

	BDoubleSpinBox*		_scaleRatioSpinBox;
	BButton*			_scaleButton;
	BButton*			_swapYZButton;

	BButtonGroupHolder	_objectsGroup;
	BTreeWidget*		_sceneTree;
};

#endif
